// 整个文件废弃，数据库逻辑不再抽取出来了，跑不起来……
var settings = require('../settings')
var Db = require('mongodb').Db
var MongoClient = require('mongodb').MongoClient

function MongoDatabase() {
    this.connect = function (func) {
        MongoClient.connect(settings.url, { useNewUrlParser: true }, func)
    }

    this.close = function () {
        MongoClient.close()
    }
}

module.exports = new MongoDatabase()